package mythread.demo001;

public class MyThread16_2Test extends Thread {

    public static void main(String[] args) {
        //yield 放弃当前资源：不确定什么时候
         //优先级可以继承,优先级有规则性质-大部分先执行
        //5 55 5
        //Thread.currentThread().setPriority(6);//5 6 6 6
        for (int i = 0; i <5 ; i++) {
            MyThread16_2A myThread = new MyThread16_2A();
            myThread.setPriority(10);
            myThread.start();

            MyThread16_2B myThreadb = new MyThread16_2B();
            myThreadb.setPriority(1);
            myThreadb.start();
        }
        //线程优先级

    }
}
